extends Control


# Called when the node enters the scene tree for the first time.
func _ready():
	#自适应布局
	$TextureRect3.position = Vector2.ZERO
	#get_tree().root.connect("size_changed", self._on_viewport_size_changed)


func add_score(player_num, add):
	if player_num == 1:
		$HBoxContainer/Score1.text = str(int($HBoxContainer/Score1.text)+add)
		$HBoxContainer/Score1/AnimationPlayer.play("get_point")
	else:
		$HBoxContainer/Score2.text = str(int($HBoxContainer/Score2.text)+add)
		$HBoxContainer/Score2/AnimationPlayer.play("get_point")


